package com.ujs.service.impl;

import com.ujs.dao.AuthorityDao;
import com.ujs.pojo.Authority;
import com.ujs.service.AuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuthorityServiceImpl implements AuthorityService {
    @Autowired
    private AuthorityDao authorityDao;
    @Override
    public List<Authority> findAll(){
        return authorityDao.findAll();
    }
    @Override
    public Authority findById(String id){
        return authorityDao.getOne(id);
    }
    @Override
    public void save(Authority authority){
        authorityDao.save(authority);
    }
    @Override
    public void deleteById(String id){
        authorityDao.deleteById(id);
    }
}
